﻿using App.DbContexts.TestEntities;
using Microsoft.EntityFrameworkCore;
using System;

namespace App.DbContexts
{
    public class AppTestDB2Context : DbContext
    {
        public AppTestDB2Context()
        {
        }
        public AppTestDB2Context(DbContextOptions<AppTestDB2Context> options) : base(options)
        {
        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            //注入Sql链接字符串
            optionsBuilder.UseSqlServer(Config.AppTestDB2ConnectionString);
        }

        #region 表实体
        public DbSet<BlogEntity> Blogs { get; set; }
        #endregion
    }
}